<div id="content">
    	<ul class="tab-hd clearfix">
           <li ><a href="<?=Util_JxUrls::grade_url('ShowMyDepartment')?>">直属部门</a></li>
           <li ><a href="<?=Util_JxUrls::grade_url('VirtualDepartment')?>">虚线部门</a></li>
           <li ><a href="<?=Util_JxUrls::grade_url('ShowGrade')?>">总271分布</a></li>
           <li class="active"><a href="<?=Util_JxUrls::grade_url('ShowComplete')?>">考评完成度 </a></li>
        </ul>


        <div class="select-box clearfix">
           	<input type="hidden" name="serachMonth" value="" id="serachMonth"/>
        	 <div class="select-box clearfix">
        	<div class="left-cont">
             <!-- 	<input type="text"  name="txt-input" class="txt-input"/>
          	<input type="button" name="button"   class="searchbutotn"value="搜索"/> -->
            </div>
            <div class="right-cont d-posi clearfix">
            	<div class="right-cont">
            	<select id="selectsearchYear" name="searchYear" onchange="changegroupname();">
            	<?php $def_year = empty($params['year']) ? date('Y') : $params['year'];?>
                    <?php for ($i=2012;$i<2100;$i++):?>
                    <?php if($i>date('Y')){ break;}?>
                      <option value="<?=$i?>" <?php if($def_year==$i):?>selected="selected"<?php endif;?> ><?=$i?>年</option>
                    <?php endfor;?>
            	</select>
            	<select id="selectsearchMonth" name="searchMonth" onchange="changegroupname();">
	            	<?php if(!empty($year_kp)):?>
                    <?php foreach($year_kp as $val):?>
                    <option value="<?=substr($val,4)?>" <?php if($params['month']==substr($val,4)):?>selected="selected"<?php endif;?>><?=intval(substr($val,4,2))?>-<?=intval(substr($val,6))?>月</option>
                    <?php endforeach;?>
                    <?php endif;?>
            	</select>

            </div>
            </div>
        </div>

 <table class="table01" width="957" border="1" cellpadding="0" cellspacing="0" rules="rows" id='tableinfos'>
           	  <thead>
                <tr>
                    <td width="87">团队</td>
                    <td width="105">A(3.8-5.0)</td>
					<td width="105">B(2.5-3.7)</td>
					 <td width="105">C(0-2.4)</td>
					<td width="117">271提交者</td>
                    <td width="145">操作</td>
                </tr>
            </thead>
            <tbody>
            <?php foreach($datalist as $uid =>$val):?>
           		<tr>
           		<td><a class="blue" href="show271Detail.action?userid=4124&serachMonth=20130103" ><?=$all_user[$uid]['name']?>团队</a></td>
	           <td><?=empty($val['A']) ? 0 : $val['A']?> (<?php echo $this->count_abc_rate($val['A'],$val['max']);?>%)</td>
	           <td><?=empty($val['B']) ? 0 : $val['B']?> (<?php echo $this->count_abc_rate($val['B'],$val['max']);?>%)</td>
	           <td><?=empty($val['C']) ? 0 : $val['C']?> (<?php echo $this->count_abc_rate($val['C'],$val['max']);?>%)</td>
	           <td><?=$all_user[$uid]['name']?></td>
                <td></td>
           		</tr>
           <?php endforeach;?>
           	</tbody>
        </table>
  <div class="ass-buttion">
              <input type="button" onclick="over()" name="ass-button">
		</div>
    </div>
<?php $this->script_block_begin(); ?>
    <script type="text/javascript">
    $(function(){
    	  $('#depart_271').addClass("tab-on");
    	  $("#selectsearchYear").val(2013);
    	  if($("thead").find("td").length != 6){
    	      $(".tfoot02").hide();
    	  }


    	  if(0103==0102){
    		  $("#selectsearchMonth").val("0102");
    	  }else if(0103==0304){
    		  $("#selectsearchMonth").val("0304");
    	  }else if(0103==0506){
    		  $("#selectsearchMonth").val("0506");
    	  }else if(0103==0708){
    		  $("#selectsearchMonth").val("0708");
    	  }else if(0103==0910){
    		  $("#selectsearchMonth").val("0910");
    	  }else if(0103==1112){
    		  $("#selectsearchMonth").val("1112");
    	  }

    });




    function changegroupname() {
    		 var serachMonth__ = $("#selectsearchYear").val()+$("#selectsearchMonth").val();
    		 window.location.href="/performance/show271.action?serachMonth="+serachMonth__;
    }
    //调整单人code状态为55
    function updatePerformans(userId,serachMonth,updateType){
    	 var serachMonth = $("#selectsearchYear").val()+$("#selectsearchMonth").val();
    	jQuery.getJSON("/performance/HRDisagreeByCode.action",
    			 {userid:userId,serachMonth:serachMonth,updateType:updateType},
    			 function(rs){
    				 window.location.reload();
    				// location.href=location.href;
    			});
    }

    //提交操作，需要所有人状态为50或55
    	function DepartMentSnd( PartmentId, serachMonth){
    		jQuery.getJSON("/performance/DepartMentSnd.action",
    				 {departmentId:PartmentId,serachMonth:serachMonth},
    				 function(rs){
    					 window.location.reload();
    				//  changegroupname();
    			     });
    	}
    	function over(){
    		 var serachMonth = $("#selectsearchYear").val()+$("#selectsearchMonth").val();

    		if(confirm("确认考核结束")){


    			 jQuery.getJSON("/performance/over.action",
    					 {serachMonth:serachMonth},
    					 function(rs){
    						 window.location.reload();
    				     });
    		}

    	}
    	$(function(){
  		  $('#depart_271').addClass("tab-on");
  	});
  	function showPlan(userId,serachMonth){
  		window.location.href="/plan/queryPlanInfo.action?userId="+userId+"&serachDate="+serachMonth+"&types=1";
  	}
  	function showKp(userId,serachMonth){
  		window.location.href="/performance/showOtherSelfAssessment.action?user_id="+userId+"&serachDate="+serachMonth;
  	}
  	function showInterView(userId,serachMonth){
  		window.location.href="/performance/toaddInterviewInfo.action?user_id="+userId+"&serachDate="+serachMonth;
  	}
    </script>

<?php $this->script_block_end(); ?>